package dao

import (
	"activity_srv/activity"
	"activity_srv/model"
	"go.uber.org/zap"
	"smart-health-platforms/pkg"
)

func UpdateSeckillOrderStatus(in *activity.UpdateSeckillOrderStatusRequest) (*model.SeckillOrder, error) {
	m := &model.SeckillOrder{
		OrderSn:     in.OrderSn,
		OrderStatus: uint(in.OrderStatus),
	}
	err := m.UpdateSeckillOrderStatus()
	if err != nil {
		pkg.Error("更新秒杀订单状态失败", zap.Error(err))
		return nil, err
	}
	return m, nil
}
